﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="inbox.aspx.cs" Inherits="CentralOffice.WebClient.desktop.email.inbox" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat=server>
<title>inbox</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../theme/2/sms.css">
<script src="../../inc/mytable.js"></script>
<link rel="stylesheet" type="text/css" href="../../theme/2/style.css">
<script src="../../inc/js/ccorrect_btn.js"></script>
<script Language=JavaScript>
function show_msg(SMS_ID, start)
{
	if($('tr'+SMS_ID).style.display=='block')
	{
	   $('tr'+SMS_ID).style.display='none'
	   $('img'+SMS_ID).src="/images/collapsed.gif";
	   return;
	}
	$('tr'+SMS_ID).style.display='block';
	$('img'+SMS_ID).src="/images/expanded.gif";
	if($('msg'+SMS_ID).innerHTML.toLowerCase().indexOf("</div>")>0)
	   return;
	
	$('msg'+SMS_ID).innerHTML="<img src='/images/loading.gif' height='20' width='20' align='absMiddle'> 加载中，请稍候……";

	var req=getXMLHttpObj();
	req.open("GET","../show_msg.php?SMS_ID="+SMS_ID+"&start="+start,true);
	req.onreadystatechange=function(){if(req.readyState==4)$("msg"+SMS_ID).innerHTML=req.responseText;};
	req.send(null);
}
</script>

</head>
<body class="bodycolor" topmargin="5">
<form id="Form1" name="form1" method=post runat=server>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="../../images/inbox.gif" WIDTH="20" HEIGHT="20" align="absmiddle">
        <span class="big3">收件箱
            <asp:Label ID="LbNewCout" runat="server" ForeColor="Red" Text="Label" Font-Size="Small"></asp:Label><span class="small1"> 封为新邮件</span></span><br>
    </td>
  </tr>
</table>
<br>
<table class="TableList"  align="center" width="100%">
  <tr>
    <td class="Big">
    <huag:OAGridView id="gv_Email" runat="server" DataKeyNames="Id" AllowSorting="True" skinid="PagingGridView" ConfirmDelete="true" DataSourceID="odsEmail" EnableViewState="false" OnRowDataBound="gv_Email_RowDataBound" Width=100%>
   <Columns>
   
   <huag:InputCheckBoxField HeaderText=""></huag:InputCheckBoxField>
            <asp:BoundField HeaderText="发送人" DataField="FromName"  ></asp:BoundField>     
            <asp:HyperLinkField DataTextField="subject" DataNavigateUrlFormatString="seek.aspx?id={0}&type=seek&selfid={1}" DataNavigateUrlFields="BodyId,Id" HeaderText="主题[点击前为新邮件]" target="_blank"  SortExpression="subject"/>                  
            <asp:BoundField HeaderText="附件" DataField="AttachmentName"  ></asp:BoundField>
            <asp:BoundField HeaderText="日期" DataField="SendTime" SortExpression="SendTime"></asp:BoundField>
            <asp:BoundField HeaderText="大小" DataField="size"  SortExpression="size"></asp:BoundField>
   </Columns>
</huag:OAGridView><asp:ObjectDataSource id="odsEmail" runat="server" TypeName="CentralOffice.MyTable.BusinessActions.ViewEmail" EnablePaging="true" SelectCountMethod="GetCount"
        SelectMethod="GetPaged" SortParameterName="sortExpression" OnSelecting="odsMail_Selecting" >
 <SelectParameters><asp:Parameter Name="whereClause" Type=string/><asp:Parameter Name="hideDeleted" Type=boolean/><asp:Parameter Name="orderBy" Type=string/></SelectParameters>
</asp:ObjectDataSource>
    </td>
  </tr>  
  <tr class="TableControl">
<td colspan="10">

<div style="float:left;">
    &nbsp;<img src="../../images/email_open.gif" align="absMiddle">
    <asp:LinkButton ID="lnkReadAll" runat="server" OnClick="lnkReadAll_Click">标记为已读 </asp:LinkButton>&nbsp;
    <img src="../../images/delete.gif" align="absMiddle">
    <asp:LinkButton ID="lnkDel" runat="server" OnClick="lnkDel_Click" OnClientClick="return confirm('确定要删除所选邮件吗?');">删除</asp:LinkButton>&nbsp;
    <img src="../../images/delete.gif" align="absMiddle">
    <asp:LinkButton ID="lnkAll" runat="server" OnClientClick="return confirm('确定要永久删除所选邮件吗?');" OnClick="lnkAll_Click">永久删除</asp:LinkButton>&nbsp;&nbsp;
</div>
    <asp:Literal ID="lit" runat="server" EnableViewState="False"></asp:Literal></td>
</tr>
  </table>
</form>
</body>
</html>